#ifndef AC_CALYPSO_MAINWINDOW
#define AC_CALYPSO_MAINWINDOW

#include <QtGui/QMainWindow>

namespace Ui {
	class MainWindowClass;
}

namespace AirCrash {
namespace Calypso {
	class SimulationThread;
	class PrintThread;

class ExportImportThread : public QThread {
	Q_OBJECT

	bool isExport;

public:
	ExportImportThread();
	~ExportImportThread();

	void run();

	void importDb();
	void exportDb();

signals:
	void updateProgress(int value);
};

}
}

class MainWindow : public QMainWindow {
	Q_OBJECT

	Ui::MainWindowClass * mUi;
	QPrintDialog mPrintDialog;

	QProgressBar * mProgressBar;

	AirCrash::Calypso::PrintThread * mPrintThread;
	AirCrash::Calypso::SimulationThread * mSimThread;
	AirCrash::Calypso::ExportImportThread * mExportImportThread;

public:
	MainWindow(QWidget *parent = 0, Qt::WFlags flags = 0);
	~MainWindow();

protected:
	void resizeEvent(QResizeEvent * e);

public slots:
	void changePage();
	void shutdown();
	void print();
	void printDone();

	void exportDB();
	void importDB();

	void changePage(int page);
};

#endif